#ifndef NEOLOADCIRCLEPRIVATE_H
#define NEOLOADCIRCLEPRIVATE_H

#include "stdafx.h"
#include <QPainter>

class QPropertyAnimation;
class QParallelAnimationGroup;
class NeoLoadCircle;
class NeoLoadCirclePrivate : public QObject
{
    Q_OBJECT
    NEO_PRIVATE_CREATE(NeoLoadCircle)
    NEO_PROPERTY_CREATE(int, RotateAngle)
    NEO_PROPERTY_CREATE(int, CircleLength)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, BackgroundColor)
    NEO_PRIVATE_PROPERTY_CREATE_H(QColor, TrackColor)
public:
    NeoLoadCirclePrivate(QObject *parent = nullptr);
    ~NeoLoadCirclePrivate();

    void drawBackground(QPainter *painter);
    void drawTrack(QPainter *painter);

private:
    const int pCircleGap{10};
    QPropertyAnimation *pRotateAnimation;
    QPropertyAnimation *pCircleLengthAnimation;
    QParallelAnimationGroup *pAnimationGroup;
};

#endif